package nme.installer;


import nme.display.BitmapData;
import nme.media.Sound;
import nme.net.URLRequest;
import nme.text.Font;
import nme.utils.ByteArray;
import ApplicationMain;


/**
 * ...
 * @author Joshua Granick
 */

class Assets {

	
	public static function getBitmapData (id:String):BitmapData {
		
		switch (id) {
			
			case "assets/Next.png": return cast (new NME_assets_next_png (), BitmapData);
			case "assets/Cardboard_Background.png": return cast (new NME_assets_cardboard_background_png (), BitmapData);
			case "assets/PauseMenu.png": return cast (new NME_assets_pausemenu_png (), BitmapData);
			case "assets/TileSheet.png": return cast (new NME_assets_tilesheet_png (), BitmapData);
			case "assets/MainMenu.png": return cast (new NME_assets_mainmenu_png (), BitmapData);
			case "assets/audioMute.png": return cast (new NME_assets_audiomute_png (), BitmapData);
			case "assets/BLAAMMute.png": return cast (new NME_assets_blaammute_png (), BitmapData);
			case "assets/KongLoaderSheet.png": return cast (new NME_assets_kongloadersheet_png (), BitmapData);
			case "assets/Prev.png": return cast (new NME_assets_prev_png (), BitmapData);
			case "assets/Back.png": return cast (new NME_assets_back_png (), BitmapData);
			case "assets/audio.png": return cast (new NME_assets_audio_png (), BitmapData);
			case "assets/TextBackground.png": return cast (new NME_assets_textbackground_png (), BitmapData);
			case "assets/MachineGun.png": return cast (new NME_assets_machinegun_png (), BitmapData);
			case "assets/Background.png": return cast (new NME_assets_background_png (), BitmapData);
			case "assets/icon.png": return cast (new NME_assets_icon_png (), BitmapData);
			case "assets/BLAAM.png": return cast (new NME_assets_blaam_png (), BitmapData);
			
		}
		
		return null;
		
	}
	
	
	public static function getBytes (id:String):ByteArray {
		
		switch (id) {
			
			case "assets/VeraSeBd.ttf.hash": return cast (new NME_assets_verasebd_ttf_hash (), ByteArray);
			case "assets/Next.png": return cast (new NME_assets_next_png (), ByteArray);
			case "assets/VeraSeBd.ttf": return cast (new NME_assets_verasebd_ttf (), ByteArray);
			case "assets/Cardboard_Background.png": return cast (new NME_assets_cardboard_background_png (), ByteArray);
			case "assets/PauseMenu.png": return cast (new NME_assets_pausemenu_png (), ByteArray);
			case "assets/TileSheet.png": return cast (new NME_assets_tilesheet_png (), ByteArray);
			case "assets/MainMenu.png": return cast (new NME_assets_mainmenu_png (), ByteArray);
			case "assets/audioMute.png": return cast (new NME_assets_audiomute_png (), ByteArray);
			case "assets/BLAAMMute.png": return cast (new NME_assets_blaammute_png (), ByteArray);
			case "assets/KongLoaderSheet.png": return cast (new NME_assets_kongloadersheet_png (), ByteArray);
			case "assets/Prev.png": return cast (new NME_assets_prev_png (), ByteArray);
			case "assets/Back.png": return cast (new NME_assets_back_png (), ByteArray);
			case "assets/audio.png": return cast (new NME_assets_audio_png (), ByteArray);
			case "assets/Virtutes Instrumenti.mp3": return cast (new NME_assets_virtutes_instrumenti_mp3 (), ByteArray);
			case "assets/VeraSe.ttf.hash": return cast (new NME_assets_verase_ttf_hash (), ByteArray);
			case "assets/TextBackground.png": return cast (new NME_assets_textbackground_png (), ByteArray);
			case "assets/MachineGun.png": return cast (new NME_assets_machinegun_png (), ByteArray);
			case "assets/Background.png": return cast (new NME_assets_background_png (), ByteArray);
			case "assets/icon.png": return cast (new NME_assets_icon_png (), ByteArray);
			case "assets/VeraSe.ttf": return cast (new NME_assets_verase_ttf (), ByteArray);
			case "assets/BLAAM.png": return cast (new NME_assets_blaam_png (), ByteArray);
			
		}
		
		return null;
		
	}
	
	
	public static function getFont (id:String):Font {
		
		switch (id) {
			
			case "assets/VeraSeBd.ttf": return cast (new NME_assets_verasebd_ttf (), Font); 
			case "assets/VeraSe.ttf": return cast (new NME_assets_verase_ttf (), Font); 
			
		}
		
		return null;
		
	}
	
	
	public static function getSound (id:String):Sound {
		
		switch (id) {
			
			case "assets/Virtutes Instrumenti.mp3": return cast (new NME_assets_virtutes_instrumenti_mp3 (), Sound);
			
		}
		
		return null;
		
	}
	
	
	public static function getText (id:String):String {
		
		var bytes:ByteArray = getBytes (id);
		
		if (bytes == null) {
			
			return null;
			
		} else {
			
			return bytes.readUTFBytes (bytes.length);
			
		}
		
	}
	
	
}